package com.xunwulian.base.constant;


import com.xunwulian.base.util.EnumType;

/**
 * Excel中的用户状态
 */
public enum UserStatus implements EnumType<UserStatus, Integer, String> {

    ONLINE(0, "正常"),
    SINGLE_OFFLINE(1, "单向停机"),
    OFFLINE(2, "停机"),
    PRE_UNREGISTER(3, "预销号"),
    UNREGISTER(4, "销号"),
    USER_CHANGE(5, "过户"),
    SLEEP(6, "休眠"),
    UNACTIVE(7, "待激活"),
    NOT_EXISTS(99, "号码不存在"),
    UNKNOWN(88, "未知");

    public Integer type;
    public String desc;

    UserStatus(Integer type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    @Override
    public Integer getType() {
        return this.type;
    }

    @Override
    public String getDesc() {
        return this.desc;
    }

    public static boolean canBill(Integer status) {
        if (ONLINE.getType().equals(status)
                || SINGLE_OFFLINE.getType().equals(status)
                || OFFLINE.getType().equals(status)) {
            return true;
        }
        return false;
    }


}
